using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using static System.String;

namespace Assets.Scripts.Tools
{
    public class ReflectionObject
    {

        public ReflectionObject()
        {

        }

        public List<object> GetPropertyValues<T>(T obj)
        {
            if (obj == null) return null; 

             Type type = obj.GetType();
            List<object> list = new List<object>();
            if (type.IsValueType)
            {
                PropertyInfo[] propertyInfos = type.GetProperties();
                for (int i = 0; i < propertyInfos.Length; i++)
                    list.Add(propertyInfos[i].GetValue(obj));
            }

            return null;
        }
    }
}
